#region Copyright
//       Copyright (c) 2009 - Antoine Jaussoin - http://www.jaussoin.com/blog/
// 
//        This program is free software: you can redistribute it and/or modify
//        it under the terms of the GNU General Public License as published by
//        the Free Software Foundation, either version 3 of the License, or
//        (at your option) any later version.
// 
//        This program is distributed in the hope that it will be useful,
//        but WITHOUT ANY WARRANTY; without even the implied warranty of
//        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//        GNU General Public License for more details.
// 
//        You should have received a copy of the GNU General Public License
//        along with this program.  If not, see <http://www.gnu.org/licenses/>.
#endregion
using System.Collections.Generic;
using FT.Architecture.Repositories;
using FT.Architecture.Example.Core.Entities.Pets;

namespace FT.Architecture.Example.Core.Repositories
{
    /// <summary>
    /// Pet Repository
    /// </summary>
    public interface IPetRepository : IRepository<IPet>
    {
        /// <summary>
        /// Used for benchmark purpose
        /// </summary>
        /// <returns></returns>
        IList<PetView> GetPetViews();

        /// <summary>
        /// Used for benchmark purpose
        /// </summary>
        /// <returns></returns>
        IList<PetView> GetPetViewsCriteria();
    }

    /// <summary>
    /// Simple view of a Pet
    /// </summary>
    public struct PetView
    {
        private readonly string _name;
        private readonly long _id;

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="name"></param>
        /// <param name="id"></param>
        public PetView(string name, long id)
        {
            _name = name;
            _id = id;
        }

        /// <summary>
        /// Name
        /// </summary>
        public string Name
        {
            get { return _name; }
        }

        /// <summary>
        /// ID
        /// </summary>
        public long ID
        {
            get { return _id; }
        }
    }
}
